<template>
	<div class="es-block">
		<Title>当前正在报警</Title>
		<div class="table-wrapper">
			<el-table :data="alarms" height="300" size="large" empty-text="暂无数据">
				<el-table-column prop="channel.name" label="频率" />
				<el-table-column prop="channel.platform.name" label="台站" />
				<el-table-column prop="type" label="类型" />
				<el-table-column prop="source" label="来源" />
				<el-table-column prop="time" label="报警时间" width="300" />
			</el-table>
		</div>
	</div>
</template>

<script setup lang="ts">
import { ElTable, ElTableColumn } from "element-plus";
import Title from "../Title.vue";
import { inject } from "vue";
import type { Ref } from "vue";
import { Alarm } from "../../types";

const alarms = inject("alarms") as Ref<Alarm[]>;
</script>

<style lang="scss" scoped>
.es-block {
	width: 100%;
	height: 100%;
}

.table-wrapper {
	margin-top: 20px;
}
</style>
